package com.jumi.microservice.constant;

import com.jumi.microservice.common.exception.BusinessExceptionAssert;

/**
 * @author Administrator
 */

public enum CategoryEnum implements BusinessExceptionAssert {
    /**
     * 商品分类异常处理
     */
    CATEGORY_HAS_EXISTED(500, "商品分类名称已经存在"),
    CATEGORY_STATUS_ABLED(500, "的状态为启用状态,不能删除"),
    CATEGORY_COMMODITY(500, "已绑定商品，不能删除");
    private final Integer code;

    private final String message;

    CategoryEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public Integer getCode() {
        return this.code;
    }

    @Override
    public String getMessage() {
        return this.message;
    }
}
